/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package assignment_cp3120.DAO.Factory;

import assignment_cp3120.DAO.DepartureLocationDAO;
import assignment_cp3120.DAO.DestinationDAO;
import assignment_cp3120.DAO.FlightDAO;
import assignment_cp3120.DAO.GST_PromoDAO;
import assignment_cp3120.DAO.TicketDAO;
import assignment_cp3120.DAO.TransactionDAO;
import assignment_cp3120.DAO.UserDAO;

/**
 * Abstract class of the DAOFactory.
 * Holds all of the abstract classes for the DAO
 * @author Richard Irons
 */

public abstract class DAOFactory {
    private static DAOFactory f;
    
    /**
     * Protected to stop instantiation of this class
     */
    protected DAOFactory(){
    // Exists only to defeat instantiation.
    }    
    /**
     * Set the factory to the given factory
     * @param factory
     * factory to be set to
     */
    public static void setFactory(DAOFactory factory){
        DAOFactory.f = factory;
    }
    /**
     * Get the currnet DAOFactory
     * @return
     * DAOFactory
     */
    public static DAOFactory getDAOFactory(){
        return f;
    }
    /**
     * Abstract function to get the UserDAO, implementation for sub classes
     * @return
     * A UserDAO
     */
    public abstract UserDAO getUserDAO();
    /**
     * Abstract function to get the TicketDAO, implementation for sub classes
     * @return
     * A TicketDAO
     */
    public abstract TicketDAO getTicketDAO();
    /**
     * Abstract function to get the FlightDAO, implementation for sub classes
     * @return
     * A FlightDAO
     */
    public abstract FlightDAO getFlightDAO();
    /**
     * Abstract function to get the TransactionDAO, implementation for sub classes
     * @return
     * A TransactionDAO
     */
    public abstract TransactionDAO getTransactionDAO();
    /**
     * Abstract function to get the DepartureLocationDAO, implementation for sub classes
     * @return
     * A DepartureLocationDAO
     */
    public abstract DepartureLocationDAO getDepartureLocationDAO();
    /**
     * Abstract function to get the DestinationDAO, implementation for sub classes
     * @return
     * A DestinationDAO
     */
    public abstract DestinationDAO getDestinationDAO();
    /**
     * Abstract function to get the GST_PromoDAO, implementation for sub classes
     * @return
     * A GST_PromoDAO
     */
    public abstract GST_PromoDAO getGST_PromoDAO();
                                        
 }
